package com.xinqi.modules.course.classmenu.controller.inner;

import com.xinqi.common.base.response.R;
import com.xinqi.common.core.enums.CourseContentTypeEnum;
import com.xinqi.modules.course.classmenu.service.ClassMenuService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * app课程中版块设置表(ClassMenu)表控制层
 *
 * @author liuxingxing
 * @since 2023-03-06 15:40:30
 */
@Validated
@RestController
@RequestMapping("/inner/class-menu")
@RequiredArgsConstructor
public class InnerClassMenuController {
    /**
     * 服务对象
     */
    private final ClassMenuService classMenuService;


    /**
     * 查询未隐藏的所有班级菜单
     *
     * @return 所有数据
     */
    @GetMapping("/checkShowCourseContent/{classId}")
    public R<Void> checkShowCourseContent(@PathVariable("classId") Long classId, @RequestParam("contentType") CourseContentTypeEnum contentType) {
        this.classMenuService.checkShowCourseContent(classId, contentType);
        return R.ok();
    }


}
